<h1 id="Configuration"><a href="#Configuration" class="headerlink" title="Configuration"></a>Configuration</h1><p><strong>valine</strong> Supports two different initialization methods:</p>
<pre><code class="html"><span class="comment">&lt;!-- Write the argument in the constructor --&gt;</span>
<span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="undefined"></span>
<span class="javascript">    <span class="keyword">new</span> Valine({</span>
<span class="javascript">        el:<span class="string">'#comment'</span>,</span>
<span class="javascript">        appId:<span class="string">'your appid'</span>,</span>
<span class="javascript">        appKey:<span class="string">'your appkey'</span></span>
<span class="undefined">    })</span>
<span class="undefined"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span>

<span class="comment">&lt;!-- or Call the init method --&gt;</span>
<span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="undefined"></span>
<span class="javascript">    <span class="keyword">var</span> valine = <span class="keyword">new</span> Valine();</span>
<span class="undefined">    valine.init({</span>
<span class="javascript">        el:<span class="string">'#comment'</span>,</span>
<span class="javascript">        appId:<span class="string">'your appid'</span>,</span>
<span class="javascript">        appKey:<span class="string">'your appkey'</span></span>
<span class="undefined">    })</span>
<span class="undefined"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span>
</code></pre>
<h2 id="el"><a href="#el" class="headerlink" title="el"></a>el</h2><ul>
<li>Type:<code>String</code></li>
<li>Default:<code>#comment</code></li>
<li>Required:<code>true</code></li>
</ul>
<p>The DOM element to be mounted on initialization. It can be a CSS selector string or an actual HTMLElement.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    el:<span class="string">'#comment'</span>
})
</code></pre>
<p>!&gt; Please ensure that the element is unique.</p>
<h2 id="appId"><a href="#appId" class="headerlink" title="appId"></a>appId</h2><ul>
<li>Type:<code>String</code></li>
<li>Default:<code>null</code></li>
<li>Required:<code>true</code></li>
</ul>
<p>Application <code>appId</code> from <code>Leancloud</code>.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    appId:<span class="string">'your leancloud appid'</span>
})
</code></pre>
<h2 id="appKey"><a href="#appKey" class="headerlink" title="appKey"></a>appKey</h2><ul>
<li>Type:<code>String</code></li>
<li>Default:<code>null</code></li>
<li>Required:<code>true</code></li>
</ul>
<p>Application <code>appKey</code> from <code>Leancloud</code>.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    appKey:<span class="string">'your leancloud appkey'</span>
})
</code></pre>
<h2 id="region"><a href="#region" class="headerlink" title="region"></a>region</h2><ul>
<li>Type:<code>String</code></li>
<li>Default:<code>cn</code></li>
<li>Required:<code>false</code></li>
</ul>
<p>Storage node，Optional value：</p>
<ul>
<li><code>cn</code> - Chinese mainland node</li>
<li><code>us</code> - Overseas node</li>
</ul>
<pre><code class="js"><span class="keyword">new</span> Valine({
    region:<span class="string">'cn'</span>
})
</code></pre>
<p>!&gt; <code>v1.1.9-beta4</code> is supported</p>
<h2 id="placeholder"><a href="#placeholder" class="headerlink" title="placeholder"></a>placeholder</h2><ul>
<li>Type:<code>String</code></li>
<li>Default:<code>null</code></li>
<li>Required:<code>false</code></li>
</ul>
<p>Comment box placeholders.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    placeholder:<span class="string">'Just so so'</span>
})
</code></pre>
<h2 id="notify"><a href="#notify" class="headerlink" title="notify"></a>notify</h2><ul>
<li>Type:<code>Boolean</code></li>
<li>Default:<code>false</code></li>
<li>Required:<code>false</code></li>
</ul>
<p>Mail notifier, Please refer to the <a href="https://github.com/xCss/Valine/wiki/Valine-%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F%E4%B8%AD%E7%9A%84%E9%82%AE%E4%BB%B6%E6%8F%90%E9%86%92%E8%AE%BE%E7%BD%AE">configuration</a>.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    notify:<span class="literal">false</span>
})
</code></pre>
<h2 id="verify"><a href="#verify" class="headerlink" title="verify"></a>verify</h2><ul>
<li>Type:<code>Boolean</code></li>
<li>Default:<code>false</code></li>
<li>Required:<code>false</code></li>
</ul>
<p>Validation code.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    verify:<span class="literal">false</span>
})
</code></pre>
<h2 id="path"><a href="#path" class="headerlink" title="path"></a>path</h2><ul>
<li>Type:<code>String</code></li>
<li>Default:<code>window.location.pathname</code></li>
<li>Required:<code>false</code></li>
</ul>
<p>Article path(just like duoshuo <code>thread</code>), Optional value:</p>
<ul>
<li><code>window.location.pathname</code> (recommend)</li>
<li><code>window.location.href</code></li>
<li>customize (Please ensure uniqueness)</li>
</ul>
<pre><code class="js"><span class="keyword">new</span> Valine({
    path:<span class="built_in">window</span>.location.pathname
})
</code></pre>
<p>!&gt; <code>v1.1.5+</code> is supported</p>
<h2 id="avatar"><a href="#avatar" class="headerlink" title="avatar"></a>avatar</h2><ul>
<li>Type:<code>String</code></li>
<li>Default:<code>mm</code></li>
<li>Required:<code>false</code></li>
</ul>
<p><code>Gravatar</code> type, Optional value:</p>
<ul>
<li><code>mm</code></li>
<li><code>identicon</code></li>
<li><code>monsterid</code></li>
<li><code>wavatar</code></li>
<li><code>retro</code></li>
<li><code>&#39;&#39;</code>(Empty string)</li>
</ul>
<pre><code class="js"><span class="keyword">new</span> Valine({
    avatar:<span class="string">`mm`</span>
})
</code></pre>
<p>!&gt; <code>v1.1.7+</code> is supported</p>
<h2 id="guest-info"><a href="#guest-info" class="headerlink" title="guest_info"></a>guest_info</h2><ul>
<li>Type:<code>Array</code></li>
<li>Default:<code>[&#39;nick&#39;,&#39;mail&#39;,&#39;link&#39;]</code></li>
<li>Required:<code>false</code></li>
</ul>
<p>Reviewer attributes.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    guest_info:[<span class="string">'nick'</span>] <span class="comment">// Just want nickname</span>
})
</code></pre>
<p>!&gt; <code>v1.1.8-beta+</code> is supported</p>
<h2 id="pageSize"><a href="#pageSize" class="headerlink" title="pageSize"></a>pageSize</h2><ul>
<li>Type:<code>Number</code></li>
<li>Default:<code>10</code></li>
<li>Required:<code>false</code></li>
</ul>
<p>Number of pages per page.</p>
<pre><code class="js"><span class="keyword">new</span> Valine({
    pageSize:<span class="number">10</span>
})
</code></pre>
<p>!&gt; <code>v1.1.8-beta2+</code> is supported</p>
